<?php
/**
 * Created by ThinkPHP5.0.22.
 * User: 小涛.
 * Date: 2018/12/24.
 * Time: 22:14.
 */

namespace app\admin\model;


use think\Model;

class GoodsBanner extends Model
{
    //banner轮滚图与图片的对应关系
    public function UploadLogo(){
        return $this -> belongsTo("Upload","logo","id");
    }

    //列表
    public static function listBanner(){
        return self::with("UploadLogo")
            -> order("sort desc") -> select();
    }

}